// 根据 groupTagId 找 tag

export const groupTagsSelector = (state, groupTagIds) => {
  const { groupTag: groupTags } = state.label;
  if (!groupTags || Object.values(groupTags).length === 0 || !groupTagIds)
    return [];
  const result = [];
  for (const groupTag of Object.values(groupTags)) {
    for (const tag of groupTag) {
      if (groupTagIds.includes(tag.groupId)) result.push(tag);
    }
  }
  return result;
};
